<input type="text" size="10" value="" id="dialog" readonly="readonly"/> <button id="dialogButton">Open dialog</button>
<script type="text/javascript">
function setDateFromDialog(date) { 
    $('#dialog').val(date); 
}
</script>